package com.zjcloud.motr.service.impl;

import java.util.List;
import com.zjcloud.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjcloud.motr.mapper.ZjyTrainingProgramsMapper;
import com.zjcloud.motr.domain.ZjyTrainingPrograms;
import com.zjcloud.motr.service.IZjyTrainingProgramsService;

/**
 * 培养方案Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-30
 */
@Service
public class ZjyTrainingProgramsServiceImpl implements IZjyTrainingProgramsService 
{
    @Autowired
    private ZjyTrainingProgramsMapper zjyTrainingProgramsMapper;

    /**
     * 查询培养方案
     * 
     * @param id 培养方案主键
     * @return 培养方案
     */
    @Override
    public ZjyTrainingPrograms selectZjyTrainingProgramsById(Long id)
    {
        return zjyTrainingProgramsMapper.selectZjyTrainingProgramsById(id);
    }

    /**
     * 查询培养方案列表
     * 
     * @param zjyTrainingPrograms 培养方案
     * @return 培养方案
     */
    @Override
    public List<ZjyTrainingPrograms> selectZjyTrainingProgramsList(ZjyTrainingPrograms zjyTrainingPrograms)
    {
        return zjyTrainingProgramsMapper.selectZjyTrainingProgramsList(zjyTrainingPrograms);
    }

    /**
     * 新增培养方案
     * 
     * @param zjyTrainingPrograms 培养方案
     * @return 结果
     */
    @Override
    public int insertZjyTrainingPrograms(ZjyTrainingPrograms zjyTrainingPrograms)
    {
        zjyTrainingPrograms.setCreateTime(DateUtils.getNowDate());
        return zjyTrainingProgramsMapper.insertZjyTrainingPrograms(zjyTrainingPrograms);
    }

    /**
     * 修改培养方案
     * 
     * @param zjyTrainingPrograms 培养方案
     * @return 结果
     */
    @Override
    public int updateZjyTrainingPrograms(ZjyTrainingPrograms zjyTrainingPrograms)
    {
        zjyTrainingPrograms.setUpdateTime(DateUtils.getNowDate());
        return zjyTrainingProgramsMapper.updateZjyTrainingPrograms(zjyTrainingPrograms);
    }

    /**
     * 批量删除培养方案
     * 
     * @param ids 需要删除的培养方案主键
     * @return 结果
     */
    @Override
    public int deleteZjyTrainingProgramsByIds(Long[] ids)
    {
        return zjyTrainingProgramsMapper.deleteZjyTrainingProgramsByIds(ids);
    }

    /**
     * 删除培养方案信息
     * 
     * @param id 培养方案主键
     * @return 结果
     */
    @Override
    public int deleteZjyTrainingProgramsById(Long id)
    {
        return zjyTrainingProgramsMapper.deleteZjyTrainingProgramsById(id);
    }
}
